-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pref > Controller: allow creating a new mapping with 'No Mapping' selected #4905
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fix is unfortunately not consistent with the behavior of the button after changing a mapping. The learning wizard button has already the pop up to ask for apply when the mapping has changed, this is bypassing the gray out state AFTER apply:
- open the mapping pane
- Select No Mapping
- Click Learn Assistant
- Confirm Applying Popup
- Now the leaning Wizzart has "No Mapping" to modify.
Solutions
- Remove Graying out and add a Pop up "Select an existing mapping to modify frist";
- Gray out the Learn assistant if the "No Mapping" is selected (before apply)
Thanks for testing!
Well, this fixes #10540 Btw there is also the issue that
|
That could fix #10540 though there's much more to it. Prior to that I added two fixup commits. @daschuer Please give me a ✔️ when you reviewed those so I can squash them. |
8fa2c5d
to
ca57abf
Compare
// shortuct to create and assign required IO table models (no GUI changes) | ||
slotShowMapping(m_pMapping); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... otherwise there's no input table the recorded mappings can be applied to.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we may as well split the table model creation into a separate function, though for the 'new mapping' case there's no overhead in using slotShowMapping
(it just updates the mapping info section, which is empty anyway)
// creating a new, empty mapping LegacyMidiControllerMapping with the wizard | ||
if (m_pJSEngine) { | ||
callFunctionOnObjects(m_scriptFunctionPrefixes, "shutdown"); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
otherwise we'd hit debug assertions in callFunctionOnObjects
and ControllerScriptEngineBase::shutdown()
when the new mapping applied.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(peviously/2.3 both methods simly returned when there was no js engine)
Just tested the current state of this PR:
Is it intended to allow to learn a new mapping from the scratch with this PR? |
Is there a reason the we show the populated IO Tabs grayed out after selection a mapping? You cannot even adjust the columns to make the content fully visible and they are hard to read. I propose to just gray out the edit buttons, if required. Maybe we should consider to auto adjust the columns width. |
This PR has a creeping scope. Did you consider to polish the original bug-fix for 2.3 and move the features into another branch? |
ca57abf
to
06ac0df
Compare
No problem, I extracted some fixes for 2.3, see #10821 |
About greying out the I/O tabs, I'm not sure what the intention is. I don't mind if we remove that entirely. Auto-adjust columns is a nice-to-have item for later on. |
This PR just fixes the behaviour of 2.3 which was broken because the Wizard button was disabled with 'No Mapping' and the I/O table models were not linked to the mapping when starting the wizard with 'No Mapping'.
IMO "No Mapping" serves these cases:
Thus, I'm not tempted to make the code & UX more complex. |
Btw this is also fixed, the name field is empty. |
When "No mapping" is selected we could show a hint where the mapping description is displayed:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, works good now.
slotUpdate()
when re-opening the preferences)isDirty
when starting the Wizard with 'No Mapping' selected after opening the peferences